Public Class DiagnoseType

    Protected _diagnose_type_id As Integer
    Protected _diagnose_type_name As String
    Protected _Data As ArrayList
    Protected _DataCurrent As Integer

    Public Property diagnose_type_id() As Integer
        Get
            Return _diagnose_type_id
        End Get
        Set(ByVal value As Integer)
            _diagnose_type_id = value
        End Set
    End Property

    Public Property diagnose_type_name() As String
        Get
            Return _diagnose_type_name
        End Get
        Set(ByVal value As String)
            _diagnose_type_name = value
        End Set
    End Property

    Public Function getDiagnoseType() As System.Data.DataSet
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_DiagnoseType"

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "DiagonosetType")

        Return objDs
    End Function

    Public Function getsDiagnoseType() As ArrayList
        Dim outResult As New ArrayList()
        Dim decryptText As New DateUtilities.Encrypt_Data()
        Dim objConn As New MySql.Data.MySqlClient.MySqlConnection( _
            decryptText.getDecrypt(System.Configuration.ConfigurationManager.ConnectionStrings( _
            "PoliceHealthConnectionString").ToString(), True))
        Dim objCmd As New MySql.Data.MySqlClient.MySqlCommand()
        objCmd.Connection = objConn
        objCmd.CommandType = CommandType.StoredProcedure
        objCmd.CommandText = "proc_SELECT_DiagnoseType"

        Dim objDa As New MySql.Data.MySqlClient.MySqlDataAdapter(objCmd)
        Dim objDs As New System.Data.DataSet()
        objDa.Fill(objDs, "DiagonosetType")

        For Each objDr As System.Data.DataRow In objDs.Tables("DiagonosetType").Rows
            Dim obj As DiagnoseType = New DiagnoseType()
            obj.diagnose_type_id = objDr.Item("diagnose_type_id").ToString()
            obj.diagnose_type_name = objDr.Item("diagnose_type_name").ToString()
            outResult.Add(obj)
        Next

        Return outResult
    End Function

    Public Function NextRecord() As Boolean
        If ((Not _Data Is Nothing) AndAlso (((Not _Data Is Nothing) AndAlso _
            (_DataCurrent < _Data.Count And _Data.Count > 0)))) Then
            _diagnose_type_id = _Data(_DataCurrent).diagnose_type_id
            _diagnose_type_name = _Data(_DataCurrent).diagnose_type_name
            _DataCurrent += 1
            Return True
        End If
        Return False
    End Function

    Public Sub LoadDiagnoseType()
        _Data = New ArrayList
        _DataCurrent = 0
        _Data = getsDiagnoseType()
    End Sub

End Class
